<template>
<div class="app">
  <h2 ref="title2">你好</h2>
  <button @click="touch">测试组件实例</button>
  <Person ref="ren"/>
</div>


</template>

<script lang="ts" setup name="App">

import Person from "./components/Person.vue";
import {ref} from "vue";
let title2=ref()
let ren=ref()

function touch(){
  // console.log(title2.value)
console.log(ren.value)
}


// export default {
//   name: "App",
//   components: {Person} //注册组件
// };
</script>

<style scoped>
.app{
  background-color: #ddd;
  box-shadow: 0 0 10px;
  border-radius: 10px;
  padding: 20px;
}
</style>